    var item = document.getElementById('item');
    var inputs = item.getElementsByTagName('input');
    var checkAll = document.getElementById('checkAll');

    checkAll.onclick = function () {
        for (var i = 0; i < inputs.length; i++) {
            var input = inputs[i];
            if (input.type === 'checkbox') {
            input.checked = this.checked;
            }
        }
    }
    
    var $item=$('#item');
    $item.on('click','.check',function(){
        checkAllCheckBox();
    })
    

    function checkAllCheckBox() {
        var isAllChecked = true;
        for (var i = 0; i < inputs.length; i++) {
            var input = inputs[i];
            if (input.type !== 'checkbox') {
                continue;
            }
            if (!input.checked) {
                isAllChecked = false;
            }
        }
        checkAll.checked = isAllChecked;
    }